﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:Framework.UI.Controls"
                    xmlns:params="http://schemas.codeplex.com/elysium/params"
                    xmlns:system="clr-namespace:System;assembly=mscorlib">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Elysium;component/Themes/Generic.xaml"/>
        <ResourceDictionary Source="/Framework.UI;component/Themes/WPF/Base/FocusVisualStyle.xaml"/>
        <ResourceDictionary Source="/Framework.UI;component/Themes/WPF/Base/Geometry.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="{x:Type controls:AccordionButton}">
        <Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
        <Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/>
        <Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
        <Setter Property="Background" Value="{StaticResource MiddleLightBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource MiddleLightBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="FocusVisualStyle" Value="{StaticResource {x:Static SystemParameters.FocusVisualStyleKey}}"/>
        <Setter Property="Foreground" Value="{StaticResource ContrastBrush}"/>
        <Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.ContentFontSize), Mode=OneWay}"/>
        <Setter Property="FontStretch" Value="Medium"/>
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="IsTabStop" Value="True"/>
        <Setter Property="Padding" Value="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.BoldPadding), Mode=OneWay}"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:AccordionButton}">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="ExpandDirectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="ExpandDown">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="icon" 
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>0</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="icon" 
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>0</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="header" 
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="header" 
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>0</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="cd0" 
                                                                       Storyboard.TargetProperty="Width"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>Auto</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames  Storyboard.TargetName="cd1" 
                                                                        Storyboard.TargetProperty="Width"
                                                                        BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Storyboard.TargetName="arrow" 
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                                         BeginTime="00:00:00" 
                                                         Duration="00:00:00" 
                                                         To="-90"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandUp">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="icon" 
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="icon" 
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="header" 
                                                                       Storyboard.TargetProperty="(Grid.Column)" 
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>0</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="header" 
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="cd0" 
                                                                       Storyboard.TargetProperty="Width" 
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="cd1" 
                                                                       Storyboard.TargetProperty="Width" 
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>Auto</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Storyboard.TargetName="arrow" 
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" 
                                                         BeginTime="00:00:00" 
                                                         Duration="00:00:00"
                                                         To="90"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="icon" 
                                                                       Storyboard.TargetProperty="(Grid.Column)" 
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="icon" 
                                                                       Storyboard.TargetProperty="(Grid.Row)" 
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>0</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="header" 
                                                                       Storyboard.TargetProperty="(Grid.Column)" 
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="header" 
                                                                       Storyboard.TargetProperty="(Grid.Row)" 
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="rd0" 
                                                                       Storyboard.TargetProperty="Height" 
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>Auto</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="rd1" 
                                                                       Storyboard.TargetProperty="Height" 
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="header" 
                                                                       Storyboard.TargetProperty="LayoutTransform" 
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <TransformGroup>
                                                        <RotateTransform RotateTransform.Angle="90"/>
                                                    </TransformGroup>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Storyboard.TargetName="arrow" 
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"  
                                                         BeginTime="00:00:00" 
                                                         Duration="00:00:00"
                                                         To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="icon" 
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>0</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="icon" 
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="header" 
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>0</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="header" 
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>0</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="rd0" 
                                                                       Storyboard.TargetProperty="Height"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="rd1" 
                                                                       Storyboard.TargetProperty="Height"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>Auto</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="header" 
                                                                       Storyboard.TargetProperty="LayoutTransform"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <TransformGroup>
                                                        <RotateTransform RotateTransform.Angle="-90"/>
                                                    </TransformGroup>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Storyboard.TargetName="arrow" 
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" 
                                                         BeginTime="00:00:00" 
                                                         Duration="00:00:00"
                                                         To="180"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="background"
                                                                       Storyboard.TargetProperty="Background"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ForegroundBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="background"
                                                                       Storyboard.TargetProperty="BorderBrush"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ForegroundBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="background"
                                                                       Storyboard.TargetProperty="Background"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LowlightBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="background"
                                                                       Storyboard.TargetProperty="BorderBrush"
                                                                       BeginTime="0" 
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LowlightBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard/>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpansionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Collapsed">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="icon" 
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" 
                                                         BeginTime="00:00:00" 
                                                         Duration="00:00:00.3"
                                                         To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Expanded">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="icon" 
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" 
                                                         BeginTime="00:00:00" 
                                                         Duration="00:00:00.3" 
                                                         To="90"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Checked"/>
                                <VisualState x:Name="Unchecked"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused"/>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="background"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                TextBlock.Foreground="{TemplateBinding Foreground}"
                                TextBlock.FontFamily="{TemplateBinding FontFamily}"
                                TextBlock.FontSize="{TemplateBinding FontSize}"
                                TextBlock.FontStretch="{TemplateBinding FontStretch}"
                                TextBlock.FontStyle="{TemplateBinding FontStyle}"
                                TextBlock.FontWeight="{TemplateBinding FontWeight}"
                                TextOptions.TextFormattingMode="{TemplateBinding TextOptions.TextFormattingMode}"
                                TextOptions.TextRenderingMode="{TemplateBinding TextOptions.TextRenderingMode}"
                                RenderOptions.ClearTypeHint="{TemplateBinding RenderOptions.ClearTypeHint}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition x:Name="cd0" Width="Auto"/>
                                    <ColumnDefinition x:Name="cd1" Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition x:Name="rd0" Height="Auto"/>
                                    <RowDefinition x:Name="rd1" Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid x:Name="icon" 
                                      Grid.Column="0" 
                                      Grid.Row="0"
                                      Height="18" 
                                      HorizontalAlignment="Center" 
                                      Margin="{Binding Converter={StaticResource DoubleToThicknessConverter}, ConverterParameter='Left, Top, Bottom', Path=Padding.Left, RelativeSource={RelativeSource TemplatedParent}}"
                                      RenderTransformOrigin="0.5,0.5" 
                                      VerticalAlignment="Center" 
                                      Width="18">
                                    <UIElement.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform Angle="-90"/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </UIElement.RenderTransform>
                                    <Path x:Name="arrow" 
                                          Data="{StaticResource ArrowHeadDownGeometry}"
                                          Fill="{TemplateBinding Foreground}"
                                          HorizontalAlignment="Center" 
                                          RenderTransformOrigin="0.5,0.5" 
                                          SnapsToDevicePixels="True"
                                          Stretch="Uniform"
                                          VerticalAlignment="Center">
                                        <UIElement.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </UIElement.RenderTransform>
                                    </Path>
                                </Grid>
                                <ContentPresenter x:Name="header" 
                                                  Grid.Column="1" 
                                                  Grid.Row="0"
                                                  Grid.RowSpan="1" 
                                                  Content="{TemplateBinding Content}" 
                                                  ContentTemplate="{TemplateBinding ContentTemplate}" 
                                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                                  Margin="{TemplateBinding Padding}"
                                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type controls:ExpandableContentControl}">
        <Setter Property="Background" Value="{StaticResource TransparentBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource TransparentBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="IsEnabled" Value="True"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:ExpandableContentControl}">
                    <ContentPresenter x:Name="ContentSite" 
                                      ContentTemplate="{TemplateBinding ContentTemplate}"
                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type controls:AccordionItem}">
        <Setter Property="TextOptions.TextFormattingMode" Value="Display"/>
        <Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/>
        <Setter Property="RenderOptions.ClearTypeHint" Value="Enabled"/>
        <Setter Property="Background" Value="{StaticResource AccentBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource AccentBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Foreground" Value="{StaticResource ContrastBrush}"/>
        <Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource Self}, Path=(params:General.ContentFontSize), Mode=OneWay}"/>
        <Setter Property="FontStretch" Value="Medium"/>
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:AccordionItem}">
                    <Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}" 
                          VerticalAlignment="{TemplateBinding VerticalAlignment}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Pressed"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused"/>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpansionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Collapsed">
                                    <Storyboard x:Name="AccordionItemCollapsedStoryboard">
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" 
                                                                       Storyboard.TargetProperty="(controls:ExpandableContentControl.Percentage)"
                                                                       BeginTime="00:00:00">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3" KeySpline="0.2,0,0,1" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" 
                                                                       Storyboard.TargetProperty="(UIElement.Visibility)"
                                                                       BeginTime="00:00:00.3" 
                                                                       Duration="00:00:00">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <ObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Expanded">
                                    <Storyboard x:Name="AccordionItemExpandedStoryboard">
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" 
                                                                       Storyboard.TargetProperty="(controls:ExpandableContentControl.Percentage)"
                                                                       BeginTime="00:00:00">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3" KeySpline="0.2,0,0,1" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="LockedStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Locked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="IsEnabled"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Boolean>False</system:Boolean>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unlocked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="IsEnabled"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Boolean>True</system:Boolean>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpandDirectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="ExpandDown">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="rd1" 
                                                                       Storyboard.TargetProperty="Height"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="cd0" 
                                                                       Storyboard.TargetProperty="Width"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="Margin"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <Thickness>0, 0, 0, 1</Thickness>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandUp">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" 
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>0</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="rd0" 
                                                                       Storyboard.TargetProperty="Height"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="cd0" 
                                                                       Storyboard.TargetProperty="Width"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="Margin"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <Thickness>0, 1, 0, 0</Thickness>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="(Grid.ColumnSpan)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" 
                                                                       Storyboard.TargetProperty="(Grid.ColumnSpan)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="(Grid.RowSpan)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>2</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" 
                                                                       Storyboard.TargetProperty="(Grid.RowSpan)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>2</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" 
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>0</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="rd0" 
                                                                       Storyboard.TargetProperty="Height"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="cd0" 
                                                                       Storyboard.TargetProperty="Width"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="Margin"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <Thickness>1, 0, 0, 0</Thickness>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="(Grid.ColumnSpan)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" 
                                                                       Storyboard.TargetProperty="(Grid.ColumnSpan)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="(Grid.RowSpan)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>2</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" 
                                                                       Storyboard.TargetProperty="(Grid.RowSpan)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>2</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" 
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>0</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandSite" 
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <system:Int32>1</system:Int32>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="rd0" 
                                                                       Storyboard.TargetProperty="Height"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="cd1" 
                                                                       Storyboard.TargetProperty="Width"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <GridLength>*</GridLength>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpanderButton" 
                                                                       Storyboard.TargetProperty="Margin"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectKeyFrame.Value>
                                                    <Thickness>0, 0, 1, 0</Thickness>
                                                </ObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background" 
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}" 
                                Padding="{TemplateBinding Padding}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition x:Name="cd0" Width="Auto"/>
                                    <ColumnDefinition x:Name="cd1" Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition x:Name="rd0" Height="Auto"/>
                                    <RowDefinition x:Name="rd1" Height="Auto"/>
                                </Grid.RowDefinitions>
                                <!-- Style="{TemplateBinding AccordionButtonStyle}" -->
                                <controls:AccordionButton x:Name="ExpanderButton" 
                                                          Background="{TemplateBinding Background}"
                                                          Content="{TemplateBinding Header}" 
                                                          ContentTemplate="{TemplateBinding HeaderTemplate}" 
                                                          FontFamily="{TemplateBinding FontFamily}" 
                                                          FontSize="{TemplateBinding FontSize}" 
                                                          FontStretch="{TemplateBinding FontStretch}" 
                                                          FontStyle="{TemplateBinding FontStyle}" 
                                                          FontWeight="{TemplateBinding FontWeight}"
                                                          Foreground="{TemplateBinding Foreground}" 
                                                          HorizontalAlignment="{TemplateBinding HorizontalAlignment}" 
                                                          HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                                          IsChecked="{TemplateBinding IsSelected}" 
                                                          IsTabStop="True"
                                                          VerticalAlignment="{TemplateBinding VerticalAlignment}" 
                                                          VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <!-- Style="{TemplateBinding ExpandableContentControlStyle}"   -->
                                <controls:ExpandableContentControl x:Name="ExpandSite"
                                                                   Grid.Row="1" 
                                                                   Content="{TemplateBinding Content}" 
                                                                   ContentTemplate="{TemplateBinding ContentTemplate}" 
                                                                   FontFamily="{TemplateBinding FontFamily}" 
                                                                   FontSize="{TemplateBinding FontSize}" 
                                                                   FontStretch="{TemplateBinding FontStretch}" 
                                                                   FontStyle="{TemplateBinding FontStyle}" 
                                                                   FontWeight="{TemplateBinding FontWeight}" 
                                                                   Foreground="{StaticResource ForegroundBrush}" 
                                                                   HorizontalAlignment="{TemplateBinding HorizontalAlignment}" 
                                                                   HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                                                   IsTabStop="False" 
                                                                   Percentage="0" 
                                                                   RevealMode="{TemplateBinding ExpandDirection}" 
                                                                   VerticalAlignment="{TemplateBinding VerticalAlignment}"
                                                                   VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type controls:Accordion}">
        <Setter Property="Background" Value="{StaticResource TransparentBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource TransparentBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel VerticalAlignment="Top"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:Accordion}">
                    <Grid Grid.Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Pressed"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused"/>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border" 
                                Background="{TemplateBinding Background}" 
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}" 
                                Padding="{TemplateBinding Padding}">
                            <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
                                          ScrollViewer.VerticalScrollBarVisibility="Disabled" 
                                          Background="{x:Null}"
                                          BorderThickness="0"
                                          IsTabStop="False">
                                <ItemsPresenter/>
                            </ScrollViewer>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>